package com.shimba.recording.universalinterface;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.shimba.recording.universalinterface.bean.UserBean;
import com.shimba.recording.universalinterface.nblinterface.FunctionManager;

/**
 * Created by Administrator on 2019/1/10.
 */

public class FragmentThree extends Fragment {

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_three, null);
        //调用有参数 无返回值
        (view.findViewById(R.id.tv_three)).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                UserBean userBean = FunctionManager.getInstance().invokeFunction("hasParamHasResult", new UserBean("rice", "6"), UserBean.class);
                Log.e("===> 得到返回数据", userBean.toString());

            }

        });
        return view;
    }
}
